home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Sample.bin / README.txt < prev    next >
Text File  |  1998-06-30  |  2KB  |  48 lines

  1. The four examples in this directory: TableExample1, TableExample2, 
  2. TableExample3 and TableExample4 show how to use some of the features 
  3. of swing's JTable component: 
  4.  
  5. 1. Using the JTable to show data from an SQL query input on the command line. 
  6. 2. As 1., but with a UI for configuring the database connection and query. 
  7. 3. A minmal example showing how to plug a generic sorter into the JTable. 
  8. 4. Some examples of using specialized renderers and editors. 
  9.  
  10. The second two demonstation programs: TableExample3 and TableExample4 
  11. do not depend on database connectivity and can be compiled and run 
  12. run in the normal way. 
  13.  
  14. The most interesting example is probably, TableExample2, which 
  15. has a TextArea which can be used as an editor for an SQL expression. 
  16. When the Fetch button is pressed the expression is sent to the database 
  17. and the results are displayed in the JTable underneath it.
  18.  
  19. To run TableExample1 and TableExample2, you'll need to find a driver for 
  20. your database and set the environment variable, JDBCHOME, to a directory 
  21. where it is installed. See the following URL for a list of JDBC dirvers 
  22. provided by a number of third party vendors.  
  23.  
  24. http://java.sun.com:80/products/jdbc/jdbc.drivers.html
  25.  
  26. Having done this you can run one of the database examples by 
  27. specifying a classpath that includes the JDBC classes, 
  28. the JDK classes and the example classes themselves.
  29.  
  30. For example, to run TableExample2:
  31.  
  32. On jdk1.2 on Solaris:
  33.   java -classpath $(JDBCHOME):/usr/local/java/lib/classes.zip TableExample2
  34.  
  35. On jdk1.1.x on Solaris:
  36.   setenv SWING_HOME <path to swing release>
  37.   setenv JAVA_HOME <path to jdk1.1.x release>
  38.   setenv JDBCHOME <path to JDBC driver>
  39.   runnit 
  40.  
  41.  
  42. On jdk1.1.x on win32:
  43.   set CLASSPATH=<path to jdk1.1.x release>\lib\classes.zip
  44.   set SWING_HOME=<path to swing release>
  45.   set JDBCHOME=<path to JDBC driver>
  46.   runnit
  47.  
  48.